<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var name="foo",age=18;
        var obj1={"name":name,"age":age};
        console.log(obj1);
        var obj2={name,age};  //{"name":name,"age":age};
        console.log(obj2);

        var obj3={  //ES5
            show:function(){
                console.log("Hello Function!");
            }
        };
        obj3.show();

        var obj4={  //ES6
            show(){
                console.log("Hello Function!");
            }
        };
        obj4.show();
        
    </script>
</body>
</html>